<?php

namespace AdminModule\Models;

/**
 * Image
 *
 * @author David
 */
class ImageConfig extends \Nette\Database\Table\Selection {
   
    public function __construct(\Nette\Database\Connection $connection) {
        parent::__construct('images_config', $connection);
    }
    
    /**
     * 
     * @param type $type
     * @return type
     */
    public function getConfigByType($type) {
        return $this->where('type = ?', $type)->limit(1)->fetch();
    }
}
